找传奇、传世资源到传世资源站!

WPF写的斗地主游戏源码下载

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

wpf 斗地主
WPF写的斗地主游戏源码下载 C#游戏开发-第1张<Application x:Class="TwoToOnePokerGame.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainForm.xaml"> <Application.Resources> <!--统一的Expander样式--> <Style TargetType="{x:Type Expander}" x:Key="ExpanderStyle"> <Setter Property="Background"> <Setter.Value> <LinearGradientBrush EndPoint="0.472,0.992" StartPoint="0.472,0.021"> <GradientStop Color="#FF444533" Offset="0"/> <GradientStop Color="#FFF6F7E7" Offset="1"/> </LinearGradientBrush> </Setter.Value> </Setter> <Setter Property ="Padding" Value ="10"/> <Setter Property ="BorderBrush" Value ="DimGray"/> <Setter Property ="BorderThickness" Value ="1"/> <Setter Property="IsExpanded" Value="True"/> <Setter Property="MinWidth" Value="100"/> <Setter Property ="Margin" Value ="5"/> <Setter Property ="HorizontalContentAlignment" Value ="Stretch"/> <Setter Property ="Foreground" Value ="White"/> <Setter Property ="VerticalContentAlignment" Value ="Stretch"/> <Setter Property ="Template"> <Setter.Value> <ControlTemplate TargetType ="{x:Type Expander}"> <Grid> <Border BorderBrush="{TemplateBinding Border.BorderBrush}" Margin ="1" CornerRadius="3,3,3,3" BorderThickness="{TemplateBinding Border.BorderThickness}" Background="White" SnapsToDevicePixels="True"> <Border.BitmapEffect> <DropShadowBitmapEffect Opacity ="0.5"/> </Border.BitmapEffect> </Border> <Border x:Name ="MainBorder" BorderBrush="{TemplateBinding Border.BorderBrush}" CornerRadius="3,3,3,3" BorderThickness="{TemplateBinding Border.BorderThickness}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True"> <DockPanel> <ToggleButton IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"MinWidth="0" Margin="3" FontWeight="{TemplateBinding TextElement.FontWeight}" HorizontalContentAlignment="{TemplateBinding Control.HorizontalContentAlignment}" FontStretch="{TemplateBinding TextElement.FontStretch}" VerticalContentAlignment="{TemplateBinding Control.VerticalContentAlignment}" Foreground="{TemplateBinding TextElement.Foreground}" FontFamily="{TemplateBinding TextElement.FontFamily}" x:Name="HeaderSite" FontStyle="{TemplateBinding TextElement.FontStyle}" FontSize="{TemplateBinding TextElement.FontSize}" MinHeight="0" ContentTemplate="{TemplateBinding HeaderedContentControl.HeaderTemplate}" Content="{TemplateBinding HeaderedContentControl.Header}" DockPanel.Dock="Top"> <ToggleButton.Template> <ControlTemplate TargetType="{x:Type ToggleButton}"> <Border Padding="{TemplateBinding Control.Padding}"> <Grid Background="#00FFFFFF" SnapsToDevicePixels="False"> <Grid.ColumnDefinitions><ColumnDefinition Width="19" /><ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Ellipse x:Name ="BackGrad" Height="19" Width="19" HorizontalAlignment="Center" VerticalAlignment ="Center" StrokeThickness="1" Stroke ="DarkBlue"><Ellipse.Fill> <LinearGradientBrush StartPoint ="0,0" EndPoint ="0,1"> <GradientStop Color ="LightSkyBlue" Offset ="0"/> <GradientStop Color ="Blue" Offset ="0.5"/> <GradientStop Color ="LightSkyBlue" Offset ="1"/> </LinearGradientBrush></Ellipse.Fill> </Ellipse> <Ellipse Height="19" Width="19" HorizontalAlignment="Center" VerticalAlignment ="Center" Stroke ="Transparent" x:Name ="FadeMask" StrokeThickness="1" Opacity ="0"><Ellipse.Fill> <SolidColorBrush Color ="AliceBlue"/></Ellipse.Fill> </Ellipse> <Path Stroke="White" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="arrow" SnapsToDevicePixels="False" Data="M1,1.5 L4.5,5 8,1.5"/> <Ellipse Height="19" Width="19" HorizontalAlignment="Center" VerticalAlignment ="Center" x:Name ="Highlight" StrokeThickness ="2" Stroke ="Transparent"><Ellipse.Fill> <DrawingBrush> <DrawingBrush.Drawing> <GeometryDrawing> <GeometryDrawing.Brush> <LinearGradientBrush Opacity ="0.6" StartPoint ="0,0" EndPoint ="0,1"> <GradientStop Color ="White" Offset ="0"/> <GradientStop Color ="#CCFFFFFF" Offset ="1"/> </LinearGradientBrush> </GeometryDrawing.Brush> <GeometryDrawing.Geometry> <EllipseGeometry Center ="0.5,0.5" RadiusX ="0.25" RadiusY ="0.5"/> </GeometryDrawing.Geometry> </GeometryDrawing> </DrawingBrush.Drawing> <DrawingBrush.RelativeTransform> <ScaleTransform CenterX ="0.5" CenterY ="0" ScaleX ="1.05" ScaleY ="0.6"/> </DrawingBrush.RelativeTransform> </DrawingBrush></Ellipse.Fill> </Ellipse> <ContentPresenter Margin="4,0,0,0" HorizontalAlignment="Left" x:Name="ContentSite" VerticalAlignment="Center" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" RecognizesAccessKey="True" Content="{TemplateBinding ContentControl.Content}" Grid.Column="1" /> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="ToggleButton.IsChecked" Value="True"> <Setter Property="LayoutTransform" TargetName="arrow"><Setter.Value> <ScaleTransform ScaleY ="-1"/></Setter.Value> </Setter> </Trigger> <Trigger Property ="ToggleButton.IsPressed" Value ="True"> <Setter TargetName ="BackGrad" Property ="RenderTransform"><Setter.Value> <TranslateTransform X ="0" Y ="1"/></Setter.Value> </Setter> </Trigger> <EventTrigger RoutedEvent ="UIElement.MouseEnter"> <EventTrigger.Actions><BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetName ="FadeMask" Storyboard.TargetProperty ="Opacity" To ="0.4" Duration ="0:0:0.25"/> </Storyboard></BeginStoryboard> </EventTrigger.Actions> </EventTrigger> <EventTrigger RoutedEvent ="UIElement.MouseLeave"> <EventTrigger.Actions><BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetName ="FadeMask" Storyboard.TargetProperty ="Opacity" To ="0" Duration ="0:0:0.25"/> </Storyboard></BeginStoryboard> </EventTrigger.Actions> </EventTrigger> </ControlTemplate.Triggers> </ControlTemplate> </ToggleButton.Template> </ToggleButton> <Border x:Name="ExpandSite" Margin ="5,0,5,5" Background ="#77FFFFFF" BorderBrush="{TemplateBinding Border.BorderBrush}" BorderThickness="{TemplateBinding Border.BorderThickness}"> <Border.LayoutTransform> <ScaleTransform ScaleY ="0"/> </Border.LayoutTransform> <ContentPresenter Margin="{TemplateBinding Control.Padding}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" Focusable="False" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" Content="{TemplateBinding ContentControl.Content}" DockPanel.Dock="Bottom"> </ContentPresenter> </Border > </DockPanel> </Border> </Grid> <ControlTemplate.Triggers> <Trigger Property="Expander.IsExpanded" Value="True"> <Trigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetName ="ExpandSite" Storyboard.TargetProperty ="LayoutTransform.ScaleY" To ="1" Duration ="0:0:0.5"/> <DoubleAnimation Storyboard.TargetName ="ExpandSite" Storyboard.TargetProperty="Opacity" To ="1" Duration ="0:0:0.5"/> </Storyboard> </BeginStoryboard> </Trigger.EnterActions> <Trigger.ExitActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetName ="ExpandSite" Storyboard.TargetProperty ="LayoutTransform.ScaleY" To ="0" Duration ="0:0:0.5"/> <DoubleAnimation Storyboard.TargetName ="ExpandSite" Storyboard.TargetProperty="Opacity" To ="0" Duration ="0:0:0.5"/> </Storyboard> </BeginStoryboard> </Trigger.ExitActions> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!--统一的Expander样式--> <!--统一的按钮样式--> <ControlTemplate x:Key="GlassButton" TargetType="{x:Type Button}"> <ControlTemplate.Resources> <Storyboard x:Key="Timeline1"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(UIElement.Opacity)"> <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/> </DoubleAnimationUsingKeyFrames> </Storyboard> <Storyboard x:Key="Timeline2"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(UIElement.Opacity)"> <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </ControlTemplate.Resources> <Border BorderBrush="#FFCDCDCD" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4"> <Border Background="#B2000000" x:Name="border" BorderBrush="#CC000000" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="0.5*"/> <RowDefinition Height="0.5*"/> </Grid.RowDefinitions> <Border Opacity="0" RenderTransformOrigin="0.493,0.892" Margin="0,0,0,0" x:Name="Glow" Grid.RowSpan="2" CornerRadius="4,4,4,4"> <Border.Background> <RadialGradientBrush GradientOrigin="0.5,0.567"> <RadialGradientBrush.RelativeTransform> <TransformGroup> <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.949" ScaleY="2.092"/> <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/> <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/> <TranslateTransform X="0.022" Y="0.308"/> </TransformGroup> </RadialGradientBrush.RelativeTransform> <GradientStop Color="#B27CCCFF" Offset="0"/> <GradientStop Color="#335566FF" Offset="1"/> </RadialGradientBrush> </Border.Background> </Border> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" Height="Auto" Grid.RowSpan="2"/> <Border HorizontalAlignment="Stretch" Margin="0,0,0,0" Width="Auto" x:Name="Shine" CornerRadius="4,4,0,0" Grid.Row="0"> <Border.Background> <LinearGradientBrush EndPoint="0.547,-0.032" StartPoint="0.547,0.73"> <GradientStop Color="#33FFFFFF" Offset="0"/> <GradientStop Color="#99FFFFFF" Offset="1"/> </LinearGradientBrush> </Border.Background> </Border> </Grid> </Border> </Border> <ControlTemplate.Triggers> <Trigger Property="IsPressed" Value="True"> <Setter Property="Background" TargetName="border" Value="#66000000"/> <Setter Property="Background" TargetName="Shine"> <Setter.Value> <LinearGradientBrush EndPoint="0.547,-0.032" StartPoint="0.547,0.73"> <GradientStop Color="#33FFFFFF" Offset="0"/> <GradientStop Color="#CCFFFFFF" Offset="1"/> </LinearGradientBrush> </Setter.Value> </Setter> <Setter Property="Opacity" TargetName="Glow" Value="0.3"/> </Trigger> <Trigger Property="IsMouseOver" Value="True"> <Trigger.EnterActions> <BeginStoryboard x:Name="Timeline1_BeginStoryboard" Storyboard="{StaticResource Timeline1}"/> </Trigger.EnterActions> <Trigger.ExitActions> <BeginStoryboard x:Name="Timeline2_BeginStoryboard" Storyboard="{StaticResource Timeline2}"/> </Trigger.ExitActions> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> <Style TargetType="{x:Type Button}"> <Setter Property="MinWidth" Value="80"/> <Setter Property="MinHeight" Value="40"/> <Setter Property="Foreground" Value="#EEEEEEEE"/> <Setter Property="Template" Value="{DynamicResource GlassButton}"/> </Style> <!--按钮样式结束--> </Application.Resources></Application>

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复